import 'package:json_annotation/json_annotation.dart';

part 'xmm_user.g.dart';

@JsonSerializable()
class XmmUser {
  String? token; // 用户登录令牌
  int? isFirstRegister; // 是否为第一次注册
  String? userId; // 用户ID
  String? avatarUrl; // 头像地址
  String? avatar; //
  String? avatarMiddleThumbUrl; // 中等大小头像
  String? avatarThumbUrl; // 头像缩略图
  int? gender; // 性别
  String? nickname; // 昵称
  int? age; // 年龄
  String? birthday; // 生日
  String? country; // 国家
  String? about; // 个人介绍
  bool? isBlock; // 是否被拉黑
  bool? isFriend; // 是否是好友
  String? rongcloudToken; // 融云Token
  int availableCoins; // 剩余金币个数

  XmmUser(
      {this.token,
      this.isFirstRegister,
      this.userId,
      this.avatarUrl,
      this.avatar,
      this.avatarMiddleThumbUrl,
      this.avatarThumbUrl,
      this.gender,
      this.nickname,
      this.age,
      this.birthday,
      this.country,
      this.about,
      this.isBlock,
      this.isFriend,
      this.rongcloudToken,
      this.availableCoins = 0});

  factory XmmUser.fromJson(Map<String, dynamic> json) =>
      _$XmmUserFromJson(json);

  Map<String, dynamic> toJson() => _$XmmUserToJson(this);
}
